<?php /* Smarty version 2.6.18, created on 2009-10-07 05:18:08
         compiled from mail_popup.tpl */ ?>
<form name="popupForm" method="POST" action="/admin/mailAdd">
	<div class="blue" width="100%" id="drag_bar">
		<h2 class="dotted">Message Content</h2>
	</div>
	<br>
	<input type="hidden" name="hid" value="<?php echo $this->_tpl_vars['msg']['message_id']; ?>
">
	<div width="100%" >
		<table width="100%">			
			<tr>
				<?php if ($this->_tpl_vars['id'] == 0): ?>
				<td>Send To:</td>
				<td>
					<select name="sendto">
					<?php $_from = $this->_tpl_vars['sendtos']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['sendto']):
?>
						<option value="<?php echo $this->_tpl_vars['sendto']['id']; ?>
"> 
							<?php echo $this->_tpl_vars['sendto']['name']; ?>

						</option>
					<?php endforeach; endif; unset($_from); ?>
					</select>
				</td>
				<?php endif; ?>
			</tr>
			<tr>
				<td>Subject:</td>
				<td><input type="text" name="subject" value="<?php echo $this->_tpl_vars['msg']['subject']; ?>
"></td>
			</tr>
			<tr>
				<td>Message:</td>
				<td><textarea cols="50" name="message" rows="20"><?php echo $this->_tpl_vars['msg']['message']; ?>
</textarea></td>
			</tr>
		</table>
		<input type="button" value="Close" onclick="redirect();">
		<?php if ($this->_tpl_vars['id'] == 0): ?>
		<input type="submit" value="Send Message">
		<input type="reset" value="Reset">
		<?php endif; ?>
	</div>
<?php echo '
<script language="javascript">
function redirect(){
	//window.location="/admin/mailRefresh";
	popup(\'popUpDiv\');
}
</script>
'; ?>

</form>